<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>14给组件绑定原生事件</title>
    <script src="./vue.js"></script>
</head>

<body>
    <div id="app">
        <child @click.native="handleClick"></child>
    </div>
    <script>
        Vue.component('child', {
            template: '<div @click="handleChildClick">Child</div>',
        })
        var vm = new Vue({
            el: "#app",
            methods: {
                handleClick() {
                    alert(' c')
                    // 会打印：监听的已经不是内部组件向外触发的自定义事件了，而是原生的点击事件

                }
            },
        })
    </script>
</body>

</html>